/* eslint-disable */
import Vue from 'vue';
// import * as Sentry from '@sentry/browser'
import store from './store/store'

import {
  Button,
  Row,
  Notify,
  Col,
  Popup,
  Icon,
  NoticeBar,
  Field,
  Cell,
  CellGroup,
  Dialog,
  Toast,
  Panel,
  Radio,
  RadioGroup,
  Tab,
  Tabs
} from 'vant';
import './style/index.scss';
import App from './App.vue';
import 'vue-easytable/libs/themes-base/index.css'
import router from './router';
Vue.config.productionTip = false;

// if(process.env.NODE_ENV !== 'development'){
//   // Sentry.init({
//   //   dsn: 'https://26f2962f52534d969060d7ee7619b3fe@sentry.io/284192',
//   //   integrations: [new Sentry.Integrations.Vue({ Vue })]
//   // })
//
//   Sentry.init({
//     dsn: 'https://26f2962f52534d969060d7ee7619b3fe@sentry.io/284192',
//     integrations: [new Sentry.Integrations.Vue({ Vue })],
//     release: '0.1',
//     environment:'production'
//   })
//
// }


Vue.use(Button);
Vue.use(NoticeBar);
Vue.use(Notify);
Vue.use(Icon);
Vue.use(Popup);
Vue.use(Field);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(Toast);
Vue.use(Dialog);
Vue.use(Panel);
Vue.use(Radio);
Vue.use(RadioGroup);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Row);
Vue.use(Col);
// 自定义列表回收用的组件
Vue.component('table-operation',{
  template:`<span>
  <a href="" @click.stop.prevent="update(rowData,index)">编辑</a>&nbsp;
  <a href="" @click.stop.prevent="deleteRow(rowData,index)">删除</a>
  </span>`,
  props:{
      rowData:{
          type:Object
      },
      field:{
          type:String
      },
      index:{
          type:Number
      }
  },
  methods:{
      update(){
         // 参数根据业务场景随意构造
         let params = {type:'edit',index:this.index,rowData:this.rowData};
         this.$emit('on-custom-comp',params);
      },
      deleteRow(){
          // 参数根据业务场景随意构造
          let params = {type:'delete',index:this.index};
          this.$emit('on-custom-comp',params);

      }
  }
})

// Vue.use(Meta)

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app');
